home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / tkerror.n < prev    next >
Text File  |  1995-07-25  |  3KB  |  67 lines

  1.  
  2.  
  3.  
  4.      ttttkkkkeeeerrrrrrrroooorrrr((((nnnn))))                  TTTTkkkk ((((7777....0000))))                   ttttkkkkeeeerrrrrrrroooorrrr((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           tkerror - Command invoked to process background errors
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ttttkkkkeeeerrrrrrrroooorrrr _m_e_s_s_a_g_e
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           The ttttkkkkeeeerrrrrrrroooorrrr command doesn't exist as built-in  part  of  Tk.
  20.           Instead,  individual  applications  or  users  can  define a
  21.           ttttkkkkeeeerrrrrrrroooorrrr command (e.g. as a Tcl procedure) if  they  wish  to
  22.           handle background errors.
  23.  
  24.           A background error is one that  occurs  in  a  command  that
  25.           didn't  originate  with the application.  For example, if an
  26.           error occurs while executing a command specified with a bbbbiiiinnnndddd
  27.           of  aaaafffftttteeeerrrr  command,  then  it  is a background error.  For a
  28.           non-background error, the error can simply  be  returned  up
  29.           through  nested Tcl command evaluations until it reaches the
  30.           top-level code in the application; then the application  can
  31.           report  the  error  in  whatever  way  it  wishes.   When  a
  32.           background error  occurs,  the  unwinding  ends  in  the  Tk
  33.           library  and  there  is  no obvious way for Tk to report the
  34.           error.
  35.  
  36.           When Tk detects a background error, it invokes  the  ttttkkkkeeeerrrrrrrroooorrrr
  37.           command,  passing it the error message as its only argument.
  38.           Tk assumes that the application has implemented the  ttttkkkkeeeerrrrrrrroooorrrr
  39.           command, and that the command will report the error in a way
  40.           that makes sense for the application.  Tk  will  ignore  any
  41.           result returned by the ttttkkkkeeeerrrrrrrroooorrrr command.
  42.  
  43.           If another Tcl error occurs within the ttttkkkkeeeerrrrrrrroooorrrr command  then
  44.           Tk reports the error itself by writing a message to stderr.
  45.  
  46.           The Tk script library includes a default  ttttkkkkeeeerrrrrrrroooorrrr  procedure  |
  47.           that  posts  a  dialog  box containing the error message and  |
  48.           offers the user a chance to see a  stack  trace  that  shows  |
  49.           where the error occurred.
  50.  
  51.  
  52.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  53.           background error, reporting
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.